package com.jk.flower.mapper;

import com.jk.flower.pojo.Flower;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FlowerMapper {

    @Select("select * from flower")
    public List<Flower> getAllFlowers();

    @Select("SELECT * from flwer where flowerId=#{flowerId}")
    public Flower getFlowerfromfId(String flowerId);

    @Insert("INSERT INTO flowers(flowerName,flowerPicture,inventory,price,age,name,flowerId)")
    public void insertFlower(Flower flower);


}
